<script lang="tsx">
/**
 * 灵感絮语（论坛）
 */
export default {
  name: "inspiration-whispers"
}
</script>

<script lang="tsx" setup>
import {onMounted, ref} from "vue";
import {processRequest} from "anqin-framework";

/**
 * 挂载时运行
 */
onMounted(() => {
  getList()
})

/**
 * 获取数据
 */
const dataList: any = ref([])
const getList = async () => {
  const result = await processRequest.get("/api/BlogText", {
    pageSize: 9999
  })
  dataList.value = result.dataList
}
</script>

<template>
  <div class="inspiration-whispers">
    <div class="body">
      <div class="list">
        <div v-for="(item,index) in dataList" :key="index" class="item">
          <div class="item-left">
            <img :src="item.userHeadImage" alt="" class="item-img-logout"/>
            <div class="item-name">
              {{ item.userName }}
            </div>
          </div>
          <div class="item-right">
            <div class="item-name">
              {{ item.name }}
            </div>
            <div class="item-content">
              {{ item.content }}
            </div>
            <div class="item-bottom">
              <div class="item-bottom-time">
                {{ item.createTime }}
              </div>
              <div class="item-bottom-count">
                阅读量：{{ item.readCount }}
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<style lang="scss" scoped src="./index.scss">

</style>